package cn.taqu.dsl.activity

import android.os.Bundle
import android.util.Log
import android.widget.TextView
import androidx.appcompat.app.AppCompatActivity
import cn.taqu.dsl.R
import cn.taqu.dsl.layout.SecondActivityDslLayout

/**
 * xml 写布局
 * @author  HB.zyy
 * @date  2022-05-28
 */
class FirstActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        val beforeMills = System.currentTimeMillis()
        setContentView(R.layout.activity_xml_layout)
        val totalMills = System.currentTimeMillis() - beforeMills

        Log.d(this.javaClass.simpleName, "================= 页面构建耗时：${totalMills}ms")
        // 类似ViewBinding使用控件
        findViewById<TextView>(R.id.tvTitle).text = "xml耗时：${totalMills}ms"
    }

}